package com.ruoyi.project.jiaqin.news.domain;

import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import com.ruoyi.project.jiaqin.newsimg.domain.NewsImg;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 新闻(文章新闻,视频新闻)对象 news
 *
 * @author admin
 * @date 2020-12-11
 */
public class News extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private String id;

    /** 类型 0-文章,1-视频 */
    @Excel(name = "类型 0-文章,1-视频")
    private Integer type;

    @Excel(name = "新闻分类")
    private String newsClassId;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 文章封面 */
    @Excel(name = "文章封面")
    private String articleCovers;

    /** 文章内容 */
    @Excel(name = "文章内容")
    private String articleContent;

    /** 视频封面 */
    @Excel(name = "视频封面")
    private String videoCover;

    /** 视频url */
    @Excel(name = "视频url")
    private String videoUrl;

    /** 浏览量 */
    @Excel(name = "浏览量")
    private Long numSee;

    @Excel(name = "点赞量")
    private Long likes;

    @Excel(name = "评论数")
    private Long commentNum;

    /** 排序 */
    @Excel(name = "排序")
    private Long sort;

    /** 头像 */
    private String portrait;

    public String getPortrait() {
        return portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    /** 举报数 */
    private Integer complaintNum;

    public Integer getComplaintNum() {
        return complaintNum;
    }

    public void setComplaintNum(Integer complaintNum) {
        this.complaintNum = complaintNum;
    }

    // 发布者：0-平台 1-用户 2-其他
    private Integer publisher;
    // 用户发布新闻内容
    private String content;
    /** 发布者ID */
    @Excel(name = "发布者ID")
    private String memberId;

    private List<NewsImg> newsImg;

    /** 省ID */
    private Integer province;

    /** 市ID */
    private Integer city;

    /** 区ID */
    private Integer area;

    /** 0-关注 1-推荐 2-本地 */
    private Integer style;

    public Integer getStyle() {
        return style;
    }

    public void setStyle(Integer style) {
        this.style = style;
    }

    public Integer getProvince() {
        return province;
    }

    public void setProvince(Integer province) {
        this.province = province;
    }

    public Integer getCity() {
        return city;
    }

    public void setCity(Integer city) {
        this.city = city;
    }

    public Integer getArea() {
        return area;
    }

    public void setArea(Integer area) {
        this.area = area;
    }

    /** 是否是企业：0-否 1-是 */
    private Integer isCompany;

    /** 是否收藏：0-否 1-是 */
    private Integer isCollect;

    /** 用户头像 */
    private String headpic;

    /** 用户名*/
    private String memberName;

    private News news;

    public News getNews() {
        return news;
    }

    public void setNews(News news) {
        this.news = news;
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName;
    }

    public String getHeadpic() {
        return headpic;
    }

    public void setHeadpic(String headpic) {
        this.headpic = headpic;
    }

    public Integer getIsCompany() {
        return isCompany;
    }

    public void setIsCompany(Integer isCompany) {
        this.isCompany = isCompany;
    }

    public Integer getIsCollect() {
        return isCollect;
    }

    public void setIsCollect(Integer isCollect) {
        this.isCollect = isCollect;
    }

    public List<NewsImg> getNewsImg() {
        return newsImg;
    }

    public void setNewsImg(List<NewsImg> newsImg) {
        this.newsImg = newsImg;
    }

    public String getMemberId() {
        return memberId;
    }
    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public Integer getPublisher() {
        return publisher;
    }
    public void setPublisher(Integer publisher) {
        this.publisher = publisher;
    }

    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }


    //是否点赞
    private Boolean isLikes;

    public Boolean getIsLikes() {
        return isLikes;
    }

    public void setIsLikes(Boolean isLikes) {
        this.isLikes = isLikes;
    }

    /** 发布时间 */
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date releaseAt;

    public Long getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(Long commentNum) {
        this.commentNum = commentNum;
    }

    public String getNewsClassId() {
        return newsClassId;
    }

    public void setNewsClassId(String newsClassId) {
        this.newsClassId = newsClassId;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setType(Integer type)
    {
        this.type = type;
    }

    public Integer getType()
    {
        return type;
    }
    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }
    public void setAuthor(String author)
    {
        this.author = author;
    }

    public String getAuthor()
    {
        return author;
    }
    public void setArticleCovers(String articleCovers)
    {
        this.articleCovers = articleCovers;
    }

    public String getArticleCovers()
    {
        return articleCovers;
    }
    public void setArticleContent(String articleContent)
    {
        this.articleContent = articleContent;
    }

    public String getArticleContent()
    {
        return articleContent;
    }
    public void setVideoCover(String videoCover)
    {
        this.videoCover = videoCover;
    }

    public String getVideoCover()
    {
        return videoCover;
    }
    public void setVideoUrl(String videoUrl)
    {
        this.videoUrl = videoUrl;
    }

    public String getVideoUrl()
    {
        return videoUrl;
    }
    public void setNumSee(Long numSee)
    {
        this.numSee = numSee;
    }

    public Long getNumSee()
    {
        return numSee;
    }
    public void setReleaseAt(Date releaseAt)
    {
        this.releaseAt = releaseAt;
    }

    public Date getReleaseAt()
    {
        return releaseAt;
    }


    public Long getLikes() {
        return likes;
    }

    public void setLikes(Long likes) {
        this.likes = likes;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("type", getType())
            .append("title", getTitle())
            .append("author", getAuthor())
            .append("articleCovers", getArticleCovers())
            .append("articleContent", getArticleContent())
            .append("videoCover", getVideoCover())
            .append("videoUrl", getVideoUrl())
            .append("numSee", getNumSee())
            .append("releaseAt", getReleaseAt())
            .append("publisher", getPublisher())
            .append("content", getContent())
            .append("memberId", getMemberId())
            .append("sort", getSort())
            .append("portrait", getPortrait())
            .toString();
    }
}
